<template>
    <div>
        我是child1组件
    </div>
</template>

<script>
// 引入中央事件总线
import eventBus from './eventbus'
export default {
    data() {
        return {
        }
    },
    mounted() {
        console.log('456');
        eventBus.on('myevent', (data) => {
            console.log('data', data);
        })
    }
}
</script>
<style scoped></style>